public class test {
    public static int max2(int a,int b)
    {
       return a>b?a:b;
    }
    public static int max3(int a,int b,int c)
    {
        return max2(max2(a,b),c);
    }
    public static void main(String[] args) {
        System.out.println("两个数的最大值: " + max2(10, 20));
        System.out.println("三个数的最大值: " + max3(10, 20, 15));
        System.out.println("三个数的最大值: " + max3(5, 3, 8));
    }
}
